close;
clear;
clc;
interval = 10;
prop = importdata('m.txt');

spd_1 = prop(1:interval:end,1);
spd_2 = prop(1:interval:end,2);
spd_3 = prop(1:interval:end,3);
spd_4 = prop(1:interval:end,4);
pwm = prop(1:interval:end,5);

tiledlayout('flow');

nexttile([1 4]);
hold on
plot(pwm,spd_1);
plot(pwm,spd_2);
plot(pwm,spd_3);
plot(pwm,spd_4);
hold off
legend('电机一','电机二','电机三','电机四')
title('四电机同步动力曲线');

nexttile
plot(pwm,spd_1);
title('电机一动力曲线');
xlabel('PWM')
ylabel('速度')

nexttile
plot(pwm,spd_2);
title('电机二动力曲线');
xlabel('PWM')
ylabel('速度')

nexttile
plot(pwm,spd_3);
title('电机三动力曲线');
xlabel('PWM')
ylabel('速度')

nexttile
plot(pwm,spd_4);
title('电机四动力曲线');
xlabel('PWM')
ylabel('速度')